package com.jxdinfo.hussar.example.scada.tunnel.messcadatunnelkilnrecord.controller;

import io.swagger.annotations.Api;
import com.jxdinfo.hussar.support.mp.base.controller.HussarBaseController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jxdinfo.hussar.support.audit.core.annotations.AuditLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jxdinfo.hussar.support.audit.core.enums.AuditEventGrade;
import com.jxdinfo.hussar.support.audit.core.enums.AuditEventType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Arrays;
import com.jxdinfo.hussar.example.scada.tunnel.messcadatunnelkilnrecord.dto.MesScadaTunnelkilnRecordMesscadatunnelkilnrecorddataset1;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.ApiParam;
import com.jxdinfo.hussar.platform.core.base.apiresult.ApiResponse;
import org.springframework.web.bind.annotation.RequestBody;
import io.swagger.annotations.ApiOperation;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jxdinfo.hussar.example.scada.tunnel.messcadatunnelkilnrecord.vo.MesScadaTunnelkilnRecordPageVO;
import com.jxdinfo.hussar.example.scada.tunnel.messcadatunnelkilnrecord.model.MesScadaTunnelkilnRecord;
import com.jxdinfo.hussar.example.scada.tunnel.messcadatunnelkilnrecord.service.MesScadaTunnelkilnRecordService;
import org.springframework.web.bind.annotation.GetMapping;
import com.alibaba.fastjson.JSONObject;

/**
 * 隧道窑记录表控制器
 */
@RestController(value = "scada.tunnel.messcadatunnelkilnrecord.MesScadaTunnelkilnRecordController")
@AuditLog(moduleName = "隧道窑记录表")
@RequestMapping(value = "/scada/tunnel/mesScadaTunnelkilnRecord")
@Api(tags = "隧道窑记录表控制器")
public class MesScadaTunnelkilnRecordController extends HussarBaseController<MesScadaTunnelkilnRecord, MesScadaTunnelkilnRecordService> {

    private static final Logger logger = LoggerFactory.getLogger(MesScadaTunnelkilnRecordController.class);

    @Autowired
    private MesScadaTunnelkilnRecordService mesScadaTunnelkilnRecordService;

    /**
     * 隧道窑记录表表格查询（带分页）
     *
     * @param page 分页对象
     * @return 查询结果
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表格查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @ApiOperation(value = "隧道窑记录表表格查询（带分页）", notes = "隧道窑记录表表格查询（带分页）")
    @PostMapping("hussarQueryPage")
    public ApiResponse<MesScadaTunnelkilnRecordPageVO> hussarQueryPage(@RequestBody Page<MesScadaTunnelkilnRecord> page) {
        return mesScadaTunnelkilnRecordService.hussarQueryPage(page);
    }

    /**
     * 隧道窑记录表表格导入
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表格导入", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.INSERT)
    @ApiOperation(value = "隧道窑记录表表格导入", notes = "隧道窑记录表表格导入")
    @PostMapping("/tableSave")
    public ApiResponse<Boolean> tableSave(@RequestBody JSONObject tableData) {
        return mesScadaTunnelkilnRecordService.tableSave(tableData);
    }

    /**
     * 隧道窑记录表表格批量删除
     *
     * @param ids id数组
     * @return 删除成功标识
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "批量删除", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.DELETE)
    @ApiOperation(value = "隧道窑记录表表格批量删除", notes = "隧道窑记录表表格批量删除")
    @PostMapping("flagDelete")
    public ApiResponse<Boolean> flagDelete(@RequestParam(value = "ids") String[] ids) {
        return mesScadaTunnelkilnRecordService.flagDelete(Arrays.asList(ids));
    }

    /**
     * 隧道窑记录表表格查询
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表格查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @ApiOperation(value = "隧道窑记录表表格查询", notes = "隧道窑记录表表格查询")
    @PostMapping("hussarQuery")
    public ApiResponse<MesScadaTunnelkilnRecordPageVO> hussarQuery() {
        return mesScadaTunnelkilnRecordService.hussarQuery();
    }

    /**
     * 隧道窑记录表表单查询
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表单查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @ApiOperation(value = "隧道窑记录表表单查询", notes = "隧道窑记录表表单查询")
    @GetMapping("formQuery")
    public ApiResponse<MesScadaTunnelkilnRecord> formQuery(@RequestParam(value = "id") String id) {
        return mesScadaTunnelkilnRecordService.formQuery(id);
    }

    /**
     * 隧道窑记录表表格查询（带分页）
     *
     * @param page 分页对象
     * @return 查询结果
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表格查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @ApiOperation(value = "隧道窑记录表表格查询（带分页）", notes = "隧道窑记录表表格查询（带分页）")
    @PostMapping("hussarQuerymesScadaTunnelkilnRecordSort_1Page")
    public ApiResponse<MesScadaTunnelkilnRecordPageVO> hussarQuerymesScadaTunnelkilnRecordSort_1Page(@RequestBody Page<MesScadaTunnelkilnRecord> page) {
        return mesScadaTunnelkilnRecordService.hussarQuerymesScadaTunnelkilnRecordSort_1Page(page);
    }

    /**
     * 隧道窑记录表表格查询
     *
     * @return 查询结果
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表格查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @ApiOperation(value = "隧道窑记录表表格查询", notes = "隧道窑记录表表格查询")
    @PostMapping("hussarQuerymesScadaTunnelkilnRecordSort_1")
    public ApiResponse<MesScadaTunnelkilnRecordPageVO> hussarQuerymesScadaTunnelkilnRecordSort_1() {
        return mesScadaTunnelkilnRecordService.hussarQuerymesScadaTunnelkilnRecordSort_1();
    }

    /**
     * 隧道窑记录表表格查询（带分页）
     *
     * @param messcadatunnelkilnrecorddataset1 查询对象
     * @return 查询结果
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表格查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @ApiOperation(value = "隧道窑记录表表格查询（带分页）", notes = "隧道窑记录表表格查询（带分页）")
    @PostMapping("hussarQuerymesScadaTunnelkilnRecordCondition_1mesScadaTunnelkilnRecordSort_1Page")
    public ApiResponse<MesScadaTunnelkilnRecordPageVO> hussarQuerymesScadaTunnelkilnRecordCondition_1mesScadaTunnelkilnRecordSort_1Page(@RequestBody MesScadaTunnelkilnRecordMesscadatunnelkilnrecorddataset1 messcadatunnelkilnrecorddataset1) {
        return mesScadaTunnelkilnRecordService.hussarQuerymesScadaTunnelkilnRecordCondition_1mesScadaTunnelkilnRecordSort_1Page(messcadatunnelkilnrecorddataset1);
    }

    /**
     * 隧道窑记录表表格查询
     *
     * @param messcadatunnelkilnrecorddataset1 查询对象
     * @return 查询结果
     */
    @AuditLog(moduleName = "隧道窑记录表", eventDesc = "表格查询", eventGrade = AuditEventGrade.SERVICE_LOG_TYPE, evnetType = AuditEventType.QUERY)
    @ApiOperation(value = "隧道窑记录表表格查询", notes = "隧道窑记录表表格查询")
    @PostMapping("hussarQuerymesScadaTunnelkilnRecordCondition_1mesScadaTunnelkilnRecordSort_1")
    public ApiResponse<MesScadaTunnelkilnRecordPageVO> hussarQuerymesScadaTunnelkilnRecordCondition_1mesScadaTunnelkilnRecordSort_1(@RequestBody MesScadaTunnelkilnRecordMesscadatunnelkilnrecorddataset1 messcadatunnelkilnrecorddataset1) {
        return mesScadaTunnelkilnRecordService.hussarQuerymesScadaTunnelkilnRecordCondition_1mesScadaTunnelkilnRecordSort_1(messcadatunnelkilnrecorddataset1);
    }
}
